﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Status.aspx.cs" Inherits="Workflow.Create" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <%--<link href="Css/css.css" rel="stylesheet" type="text/css" />--%>
    <link type="text/css" rel="stylesheet" href="css/pagination.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    
    <script type="text/javascript" src="Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.js"></script>
    <script type="text/javascript" src="Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="Scripts/Pageination.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <%--<div class="definewidth m10">
            <input id="button1" class="btn btn-primary" type="submit" name="button1" value="新建工作流" onclick="openWin('AddInfo.aspx',720,500)" runat="server"/>
        </div>--%>
        
    </div>
    <div>
        <div id="Pagination" class="pagination definewidth m10"></div>
         <table class="table table-bordered definewidth m10"><%-- --%>
            <thead>
                <% for (int j = 0; j < resultList.Count; ) %>
                <% { %>
                    <tr>
                    <th>工作流序号</th>
                    <th>工作流名称</th>
                    <th>当前状态</th>
                    <th>标题</th>
                    <th>创建时间</th>
                    <th>紧急程度</th>
                    <%if (resultList[j].StatusDefine == 0) {%>
                            <th>退回原因</th>
                    <%} %>
                    <th></th>
                    <%if (resultList[j].StatusDefine == 0) {%>
                        <th></th>
                    <%} %>
                    <%if (resultList[j].StatusDefine != 100){%>
                        <th></th>
                    <% }%>
                    <th></th>
                </tr>
                    <% break; %>
                <% }%>
                
            </thead>
            <tbody id="Searchresult"></tbody>
            <tbody id="hiddenresult" style="display:none">
                <% for (int i = 0; i < resultList.Count; i++) {%>
                <tr class="result">
                    <td><% =resultList[i].WorkParentId %></td>
                    <td><% =resultList[i].WorkName %></td>
                    
                    <%if (resultList[i].StatusDefine==-1) {%>
                        <td class="yellowColor"><% =resultList[i].StatusNo %> / <% =resultList[i].NodeCount %><%=resultList[i].NodeName %></td>
                    <%} else {%>
                        <td><% =resultList[i].StatusNo %> / <% =resultList[i].NodeCount %></td>
                    <%} %>
                    <td><% =resultList[i].Content %></td>
                    <td><% =resultList[i].CreateTime %></td>
                    <td><% =resultList[i].Critical %></td>
                    <%if (resultList[i].StatusDefine == 0 && resultList[i].ParentReturnReason!="")
                      {%>
                        <td class="redColor"><% =resultList[i].ParentReturnReason %></td>
                    <%} else{%>
                        <td><% =resultList[i].ParentReturnReason %></td>
                    <%}%>
                    <td><a class="DetailUrl" href="<% =resultList[i].WebName %>?WorkParentId=<%= resultList[i].WorkParentId %>">详情</a></td>
                    <%if (resultList[i].StatusDefine==0) {%>
                        <td><a class="Submit" href="SendInfo.aspx?WorkParentId=<%= resultList[i].WorkParentId %>&NodeNo=<%=resultList[i].StatusNo %>&Type=Submit"><img src="Images/gif-0790.gif" title="提交"/></a></td>
                    <%} %>
                    <%if (resultList[i].StatusDefine!=100) {%>
                        <td><a class="Close" href="Server.ashx?WorkParentId=<%= resultList[i].WorkParentId %>&Type=Close"><img src="Images/cross.png" title="关闭"/></a></td>
                    <% }%>
                    <td><a class="UpLoad" href="UpDownLoad.aspx?WorkParentId=<%= resultList[i].WorkParentId %>"><img src="Images/176.png" title="上传下载" /></a></td>
                </tr>
                <% }%>
            </tbody>
             
         </table>
    </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".DetailUrl").click(function () {
                var url = $(this).attr("href");
                openWin(url, 720, 500);
                return false;
            });
            $(".Submit").click(function () {
                var url = $(this).attr("href");
                openWin(url, 720, 500);
                return false;
            });
            $(".UpLoad").click(function () {
                var url = $(this).attr("href");
                openWin(url, 720, 500);
                return false;
            });
            $(".Close").click(function () {
                var url = $(this).attr("href");
                var tr = $(this).parent().parent();
                if (confirm("是否确认关闭此工作流？")) {
                    DelTr(url, tr, "工作流序号", "已被关闭");
                    return false;
                }
            });
        });
    </script>
</body>
</html>
